<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" dir="ltr" lang="en-US">
<![endif]-->
<!--[if IE 7]>
<html id="ie7" dir="ltr" lang="en-US">
<![endif]-->
<!--[if IE 8]>
<html id="ie8" dir="ltr" lang="en-US">
<![endif]-->
<!--[if IE 9]>
<html id="ie9" dir="ltr" lang="en-US">
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
<html dir="ltr" lang="en-US">
<!--<![endif]-->
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Sommerce Shop | The perfect e-commerce solution</title>
    
    <!-- CSS -->
    <link rel="stylesheet" type="text/css" media="all" href="__PUBLIC__/home/style.css" />
    <link rel="stylesheet" type="text/css" media="screen and (max-width: 980px)" href="__PUBLIC__/home/css/lessthen980.css" />
    <link rel="stylesheet" type="text/css" media="screen and (max-width: 600px)" href="__PUBLIC__/home/css/lessthen600.css" />
    <link rel="stylesheet" type="text/css" media="screen and (max-width: 480px)" href="__PUBLIC__/home/css/lessthen480.css" />
    <link rel="stylesheet" href="__PUBLIC__/home/css/shop.css" type="text/css" media="all" />
    <link rel="stylesheet" href="__PUBLIC__/home/css/prettyPhoto.css" type="text/css" media="all" />
    <link rel="stylesheet" href="__PUBLIC__/home/css/tipsy.css" type="text/css" media="all" />
    <link rel='stylesheet' href='__PUBLIC__/home/css/jquery-rotating.css' type='text/css' media='all' />
    <link rel='stylesheet' href='__PUBLIC__/home/css/slider-cycle.css' type='text/css' media='all' />
    <link rel='stylesheet' href='__PUBLIC__/home/css/mycss.css' type='text/css' media='all' />
    
    <!-- [favicon] begin -->    
    <link rel="shortcut icon" href="__PUBLIC__/admin/image/favicon.ico" />
    <!-- <link rel="shortcut icon" href="__PUBLIC__/plupload/Uploads/2017-01-21/1.jpg" /> -->
    <!-- [favicon] end -->  
    
    <!-- FONT -->
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lobster&amp;ver=3.3.2" type="text/css" media="all" />
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz%3A400&amp;ver=3.3.2" type="text/css" media="all" />
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Sans&amp;ver=3.3.2" type="text/css" media="all" />
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lobster&amp;text=Sommerce+Shop&amp;ver=3.3.2" type="text/css" media="all" />
    
    <!-- SCRIPTS -->
    <script type="text/javascript" src="__PUBLIC__/home/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/jquery.prettyPhoto.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/jquery.tipsy.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/jquery.tweetable.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/jquery.nivo.slider.pack.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/jquery.cycle.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/jquery.easing.1.3.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/comment-reply.js"></script>
    
    <link rel="stylesheet" type="text/css" media="all" href="__PUBLIC__/home/css/home.css" />






    <script type="text/javascript" src="__PUBLIC__/home/ditu/other/api"></script>

    <script type="text/javascript" src="__PUBLIC__/home/ditu/other/getscript"></script>

    <script type="text/javascript" src="__PUBLIC__/home/ditu/other/getscript(1)"></script>

    <script type="text/javascript" src="__PUBLIC__/home/ditu/js/SearchInfoWindow_min.js"></script>

    <link rel="stylesheet" href="__PUBLIC__/home/ditu/css/SearchInfoWindow_min.css">

    </head>
    <body class="responsive boxed-layout no_js">
    <div name="chats" style="position:fixed;bottom:5px;left:85%;width:100px;height:25px;background-color:#224e6b;z-index:99999">
        <a href="/home/chats/chats/index"><img style="width:25px;height:25px" src="__PUBLIC__/home/images/chats.jpg"><span style="position:fixed;font-size:15px;color:white">联系客服哦</span></a>
    </div>
    <script type="text/javascript">
        $('div[name="chats"]').click(function(){
            // alert('chats');
        });
    </script>
        <!-- START LIGHT WRAPPER -->
        <div class="bgLight group">
            <!-- START WRAPPER -->
            <div class="wrapper group">
                <!-- START BG WRAPPER -->
                <div class="bgWrapper group">
                    <!-- START HEADER -->
                    <div id="header" class="group">
                        <!-- .inner -->
                        <div class="inner group">
                            <!-- START LOGO -->
                            <div id="logo" class="group">
                                <a href="/" title="Sommerce Shop"> 
                                <span class="logo-title"><img src="/Public/test/1.png" alt=""></span>
                                </a>         
                                <p class="logo-description">The perfect e-commerce solution</p>
                            </div>
                            <!-- END LOGO -->        
                            <!-- START LINKSBAR -->
                            <ul id="linksbar" class="group">
                                <li class="icon cart">
                                    <a class="trigger" href="/home/goods/cart/index">
                                    <span> <span class="count_cart">
                                    {$totals}
                                    </span> items </span>
                                    </a> | 
                                    <div class="basketpopup">
                                        <h3>My Cart</h3>
                                        <span class="empty">No products in the cart.</span>
                                    </div>
                                </li>
                                <li class="">
                                    <if condition="session('home_id') eq ''"> 
                                        <a href="/home/login/login/login">登录</a>
                                    <else /> 
                                        <a name="logout" href="/home/login/login/logout">注销</a>
                                    </if> |
                                </li>
                                <li><a href="/home/login/login/register">注册</a> | </li>
                            </ul>
                            <script type="text/javascript">
                                $('a[name="logout"]').click(function(){
                                    var url=location.href;
                                    $.ajax({
                                        url:'/home/login/login/logout',
                                        data:{'url':url},
                                        type:'post',
                                        success:function(mes){
                                            eval(mes);
                                        }
                                    });
                                    return false;
                                });
                            </script>
                            <div class="copyrights">Collect from <a href="http://www.cssmoban.com/"  title="网站模板">网站模板</a></div>
                            <!-- END LINKSBAR -->  
                            <div class="clear"></div>
                            
                                <!-- START NAV -->
                                <div id="nav" class="group creative">
                                   <ul id="menu-navigation" class="level-1">
                                        <li>
                                            <a href="/">主页</a>
                                            
                                        </li>
                                        <li><a href="/home/goods/details/all">所有商品</a></li>
                                        <li class="megamenu">
                                            <a href="#">分类</a>
                                            <ul class="sub-menu">
                                            <foreach name="vo['0']['sub']" item="v">
                                                <li>
                                                    <a href="javascript:;">{$v.type_name}</a>
                                                    <ul class="sub-menu">
                                                    <foreach name="v['sub']" item='val'>
                                                        <li><a href="/home/goods/details/index/id/{$val.id}">{$val.type_name}</a></li>
                                                    </foreach>
                                                    </ul>
                                                </li>
                                            </foreach>
                                            </ul>
                                        </li>
                                        <li>
                                            <a href="#">Blog</a>
                                            <ul class="sub-menu">
                                                <li><a href="/home/blog/article/index">Blog主页</a></li>
                                                <li><a href="/home/blog/article/all">所有文章</a></li>
                                                <li><a href="#">文章分类</a>
                                                    <ul class="sub-menu">
                                                    <!-- {:var_dump($lala)} -->
                                                    <foreach name="vos" item="vv">

                                                        <li name="one">
                                                            <a href="/home/blog/article/type?id={$vv.id}">{$vv.type_name}</a>
                                                            <ul name="one" class="" style="display:none">
                                                            <foreach name="vv['sub']" item='vvv'>
                                                                <li name="two">
                                                                    <a href="/home/blog/article/type?id={$vvv.id}">{$vvv.type_name}</a>
                                                                    <!-- <if condition="$vvv['sub']">
                                                                    <ul name="two" class="" style="display:none">
                                                                    <foreach name="vvv['sub']" item='vvvv'>
                                                                        <input type="hidden" name="vvvvid" value="{$vvvv.id}"/>
                                                                        <li><a name="over" href="/home/blog/article/article/id/{$vvvv.id}">{$vvvv.type_name}</a></li>

                                                                    </foreach>
                                                                    </ul>
                                                                    </if> -->
                                                                    
                                                                </li>
                                                            </foreach>
                                                            </ul>
                                                        </li>
                                                    </foreach>
                                                    </ul>
                                                </li>
                                            </ul>
                                        </li>
                                        <li>
                                            <a href="#">个人中心</a>
                                            <ul class="sub-menu">
                                                <li><a href="/home/login/login/own">个人信息</a></li>
                                                <li><a href="/home/login/login/mima">修改密码</a></li>
                                                <li><a href="/home/goods/address/index">地址管理</a></li>
                                                <li><a href="/home/goods/order/show">查看订单</a></li>
                                            </ul>
                                        </li>
                                        <script type="text/javascript">
                                            // alert($);
                                            $('li[name="one"]').mouseover(function(){
                                                $(this).find('ul[name="one"]').css('display','block');
                                                // $(this).find('ul[name="two"]').css('display','none');
                                                $(this).find('ul[name="one"]').attr('class','sub-menu')
                                                // console.log('a');
                                            }).mouseout(function(){
                                                $(this).find('ul[name="one"]').css('display','none');
                                                $(this).find('ul[name="one"]').attr('class','');
                                            });
                                            // $('li[name="two"]').mouseover(function(){
                                            //     $(this).find('ul[name="two"]').css('display','block');
                                            //     $(this).find('ul[name="two"]').attr('class','sub-menu');
                                            // }).mouseout(function(){
                                            //     $(this).find('ul[name="two"]').css('display','none');
                                            //     $(this).find('ul[name="two"]').attr('class','');
                                            // });
                                            
                                          
                                        </script>
                                       
                                    </ul>
                                </div>
                                <!-- END NAV -->
                                
                                <!-- START SEARCH FORM -->  
                                <form role="search" method="get" id="searchform" action="/home/goods/details/index" class="group">
                                <div>
                                    <label class="screen-reader-text" for="s">查找商品</label>
                                    <input type="text" value="" name="keyword" id="s" />
                                    <input type="submit" id="searchsubmit" value="&gt;" />    
                                </div>
                                </form>
                                <!-- END SEARCH FORM -->
                            
                            </div>
                            <!-- end .inner -->  
                             
                        </div>
                        <!-- END HEADER --> 








                        <block name="content">



                        
                        </block>











                        <!-- START NEWSLETTER FORM -->
                    <div id="newsletter-form" class="group">
                        <div class="inner">
                            <div class="newsletter-section group">
                                <p class="description special-font"><strong>Stay Updated:</strong> subscribe our special newsletter</p>
                                <form method="post" action="#">
                                    <fieldset>
                                        <ul class="group">
                                            <li><label for="fullname">Your name</label><input type="text" name="fullname" id="fullname" class="name-field text-field autoclear" /></li>
                                            <li><label for="email">Your email</label><input type="text" name="email" id="email" class="email-field text-field autoclear" /></li>
                                            <li><input type="submit" value="Subscribe" class="submit-field" /></li>
                                        </ul>
                                    </fieldset>
                                </form>
                            </div>
                        </div>
                    </div>
                    <!-- ENDSTART NEWSLETTER FORM -->
                    <!-- START FOOTER -->
                    <div id="footer" class="group footer-sidebar-right columns-3">
                        <div class="inner">
                            <div class="footer-main">
                                <div id="nav_menu-3" class="widget-1 widget-first widget widget_nav_menu">
                                    <h3>Categories</h3>
                                    <div class="menu-categories-footer-container">
                                        <ul id="menu-categories-footer" class="menu">
                                            <li><a href="#">Kitchen</a></li>
                                            <li><a href="#">Bedroom</a></li>
                                            <li><a href="#">Garden</a></li>
                                            <li><a href="#">Bathroom</a></li>
                                            <li><a href="#">Wood</a></li>
                                        </ul>
                                    </div>
                                </div>
                                <div id="nav_menu-4" class="widget-2 widget widget_nav_menu">
                                    <h3>Utilities</h3>
                                    <div class="menu-utilities-container">
                                        <ul id="menu-utilities" class="menu">
                                            <li><a href="testimonials.html">Testimonial</a></li>
                                            <li><a href="faq.html">FAQ</a></li>
                                            <li><a href="blog.html">Blog</a></li>
                                            <li><a href="contact.html">Get in Touch</a></li>
                                            <li><a href="#">Privacy Policy</a></li>
                                        </ul>
                                    </div>
                                </div>
                                <div id="nav_menu-5" class="widget-3 widget-last widget widget_nav_menu">
                                    <h3>Get in touch</h3>
                                    <div class="menu-get-in-touch-container">
                                        <ul id="menu-get-in-touch" class="menu">
                                            <li><a href="#">Newsletter</a></li>
                                            <li><a href="http://www.facebook.com">Facebook</a></li>
                                            <li><a href="http://twitter.com">Twitter</a></li>
                                            <li><a href="blog.html">Blog</a></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="footer-sidebar">
                                <div id="recent-posts-3" class="widget-1 widget-first widget recent-posts">
                                    <h3>Last News</h3>
                                    <div class="recent-post group">
                                        <div class="hentry-post group">
                                            <a href="article.html" title="-50% on all vintage glasses, enjoy it" class="title">-50% on all vintage glasses, enjoy it</a>
                                            <p>Phasellus gravida augue sit amet leo dapibus a congue velit [...]</p>
                                        </div>
                                        <div class="hentry-post group">
                                            <a href="article.html" title="Sommerce &ndash; a beautiful ecommerce solution" class="title">Sommerce &#8211; a beautiful ecommerce solution</a>
                                            <p>Etiam semper magna sit amet augue blandit vel cursus erat [...]</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- END FOOTER -->
                    <!-- START COPYRIGHT -->
                    <div id="copyright" class="group two-columns" style="margin-bottom: 30px;">
                        <div class="inner group">
                            <p class="left">
                                <img src="__PUBLIC__/home/images/logo1.png" alt="" /> 
                                <span style="padding-left:10px;">
                                <foreach name="link" item="va">
                                    <a href="{$va['site_link']}"><img src="{$va['site_pic']}" style="width:20px;height:20px" alt="paypal" style="margin-right:8px" /><span style="font-size:20px;">{$va['site_name']}</span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                </foreach>   
                                   
                                </span>                             
                            </p>
                            <p class="right">
                                 
                            </p>
                        </div>
                    </div>
                    <!-- END COPYRIGHT -->          
                </div>
                <!-- END BG WRAPPER -->           
            </div>
            <!-- END WRAPPER -->              
        </div>
        <!-- END LIGHT WRAPPER --> 
        <script type="text/javascript" src="__PUBLIC__/home/js/jquery.custom.js"></script>
        <script type="text/javascript" src="__PUBLIC__/home/js/contact.js"></script>
        <script type="text/javascript">
        $('.add-to-cart').click(function(){
            var gid = $(this).attr('info');
            $.ajax({
                url:'/home/goods/cart/insert',
                data:{'gid':gid},
                type:'post',
                success:function(mes){
                    console.log(mes);
                    if(mes=='alert("您还没有登录,请登录后在添加商品!");location.href="/home/login/login/login"'){
                        eval(mes);
                    }else if(mes=='yes'){
                        alert('加入购物车成功,可以点击购物车去查看');
                    }else if(mes=='chaochu'){
                        alert('货源不足,请选择其他货物');
                    }else{
                        alert('加入购物车失败,请刷新页面重新选择');
                    }
                    count_cart();
                }
            })
            return false;
        });
        function count_cart(){
            $.ajax({
                url:'/home/goods/cart/count_cart',
                type:'post',
                success:function(mes){
                    $('.count_cart').html(mes);
                }
            });
        }
        </script>

</body>
</html>
